package hehe.validation.annotation;

import hehe.validation.base.Rule;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 验证规则注解
 *<B>说明：</B>
 *<pre>
 * 略
 *</pre>
 *<B>示例：</B>
 *<pre>
 *  略
 *</pre>
 *<B>日志：</B>
 *<pre>
 *  略
 *</pre>
 *<B>注意事项：</B>
 *<pre>
 *  略
 *</pre>
 */

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(processor = ValidRuleProcessor.class)
public @interface ValidRule
{
    String tip()  default "";
    boolean goOn() default false;
    String operator() default Rule.AND_OPERATOR;
    String[] scene() default {};
}
